import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '@/view/login/index'
import layout from '@/view/layout'
import index from '@/view/index/index'
import line from '@/view/line/index'

Vue.use(VueRouter)
const router = new VueRouter({
  routes: [
    {
      path: '/',
      redirect: 'login',
    },
    {
      name: 'login', path: '/login', component: login,
    },
    {
      name: 'layout', path: '/layout', component: layout,
      redirect: { name: 'index' },
      children: [
        {
          name: 'index', path: '/index', component: index
        },
        {
          name: 'line', path: '/line', component: line
        },

      ]
    },

  ]
})

export default router